package org.zhou.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class Borrow {
    private Integer id;
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String readerId;
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String bookId;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate returnDate;
    private Integer status;
}
